namespace lucere.index.write
{
    /// <summary>
    /// Class to write byte streams into slices of shared byte[].  This is used by 
    /// DocumentsWriter to hold the posting list for many terms in RAM.
    /// </summary>
    public interface IByteSliceWriter 
    {
        int Offset0 { get; set; }
        int Address { get; }

        /// <summary>
        /// Set up the writer to write at address.
        /// </summary>
        /// <param name="address"></param>
        void Init(int address);

        /// <summary>
        /// Write byte into byte slice stream 
        /// </summary>
        void WriteByte(byte b);
        void WriteBytes(byte[] b, int offset, int len);
        void WriteVInt(int i);
    }
}